home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / misc / TCS.lha / TCS / demos / inc / macros.i < prev    next >
Encoding:
Text File  |  2000-09-26  |  1.5 KB  |  56 lines

  1. *******************************************************************************
  2. * CALLTCS 0.0.0
  3. *******************************************************************************
  4. * INFO    calls a function of tcs.library
  5. * IN    \1    name of the function without the "TCS_" prefix
  6. *    registers    set as required by the function
  7. * OUT    a6    _TCSBase
  8. *    registers    as set by the function
  9. *******************************************************************************
  10.  
  11.     macro    CALLTCS
  12.     movea.l    _TCSBase,a6
  13.     jsr    (_LVOTCS_\1,a6)
  14.     endm
  15.  
  16.  
  17.  
  18. *******************************************************************************
  19. * WTRSTLN 0.0.1
  20. *******************************************************************************
  21. * INFO    waits for a rasterline to be completely redrawn
  22. * IN    \1    rasterline number
  23. *******************************************************************************
  24.  
  25.     macro    WTRSTLN
  26.     movem.l    d0/a0,-(sp)
  27.     lea.l    $dff004,a0
  28. .wt0\@    move.l    (a0),d0
  29.     andi.l    #$1ff00,d0
  30.     cmpi.l    #(\1)<<8,d0
  31.     bne.s    .wt0\@
  32. .wt1\@    move.l    (a0),d0
  33.     andi.l    #$1ff00,d0
  34.     cmpi.l    #(((\1)<<8)+$100),d0
  35.     bne.s    .wt1\@
  36.     movem.l    (sp)+,d0/a0
  37.     endm
  38.  
  39.  
  40.  
  41. *******************************************************************************
  42. * WTLMB & WTRMB 0.0.0
  43. *******************************************************************************
  44. * INFO    waits for left/right mouse button to be pressed
  45. *******************************************************************************
  46.  
  47.     macro    WTLMB
  48. .wt\@    btst.b    #6,$bfe001
  49.     bne.s    .wt\@
  50.     endm
  51.  
  52.     macro    WTRMB
  53. .wt\@    btst.b    #2,$dff016
  54.     bne.s    .wt\@
  55.     endm
  56.